package de.tum.in.eist.im.client;

import java.util.Date;
import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;

import de.tum.in.eist.im.client.domain.Message;
import de.tum.in.eist.im.client.domain.NewMessagesChunk;
import de.tum.in.eist.im.client.domain.User;

public interface ChatServiceNewAsync
{

    void getHistory (Date from, AsyncCallback <List <Message>> callback);

    void getLoggedInUsers (AsyncCallback <List <User>> callback);

    void getNewMessages (long clientLastTimestamp, AsyncCallback <NewMessagesChunk> callback);

    void login (User user, AsyncCallback <Boolean> callback);

    void logout (User user, AsyncCallback <Boolean> callback);

    void registerNewUser (User newUser, AsyncCallback <Void> callback);

    void sendMessage (Message message, AsyncCallback <Void> callback);
}
